#!/bin/bash

mpid=$#
sig=1
defsig=25
mrun(){
    echo mrun...
    trap "sig=$defsig;" $defsig 
    while :
    do
        if [ $sig -eq 25 ]
        then
        echo "this $sig"
        kill -9 $mpid
        exit
        fi
    done
}
mrun &
echo $!
pid_mrun=$!
while :
do
    read x
    kill -$x $pid_mrun
    echo Send...
done
